yum install -y git 
wget https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz
tar zxvf go1.8.linux-amd64.tar.gz -C /usr/local
mkdir -p /var/opt/wwwroot/goblog
cat >>/etc/profile<<EOF
export GOROOT=/usr/local/go
export GOBIN=$GOROOT/bin
export PATH=$PATH:$GOBIN
export GOPATH=/var/opt/wwwroot/goblin
EOF

source /etc/profile
go version
go get github.com/shadowsocks/shadowsocks-go/cmd/shadowsocks-server
cat >> config.json <<EOF
{
    "server":"127.0.0.1",
    "server_port":80,
    "password":"123456abcdef",
    "method": "aes-128-cfb",
    "timeout":600
}
EOF


systemctl stop firewalld.service
systemctl disable firewalld.service 

nohup shadowsocks-server -c config.json &

